import { useHistory } from '@/hooks/useHistory';
import { Button, Result } from 'antd';

const NotFound: React.FC = () => {
  const history = useHistory();
  return (
    <div style={{ padding: 24 }}>
      <Result
        status="404"
        title="404"
        subTitle="抱歉，您访问的页面不存在。"
        extra={
          <>
            <Button type="primary" onClick={() => history.push('/home')}>
              返回首页
            </Button>
            <Button onClick={() =>history.back()} style={{ marginLeft: 8 }}>
              返回上一页
            </Button>
          </>
        }
      />
    </div>
  );
};

export default NotFound;
